Metrics-Based Code Smell Detection in Highly Configurable Software Systems

نویسندگان

  • Daniel Meyer
  • Gunter Saake
  • Wolfram Fenske
  • Sandro Schulze
چکیده

A code smell is a symptom in computer programming that may indicate design flaws or code decay within a software system. As such, much research has been conducted regarding their detection and impact on understandability and changeability of source code. Current methods, however, can not be applied to highly configurable software systems, that is, variable systems that can be configured to fit a wide range of requirements or platforms. This variability is often based on conditional compilation implemented using C preprocessor annotations (#ifdef). These annotations directly interact with the host language (e.g., C) and therefore may have negative effects on understandability and changeability of the source code. In this case, we refer to them as variability-aware code smells. In this thesis, we propose 1) a concept of how to detect such variability-aware code smells with a metrics-based approach, and 2) a code smell detector, called Skunk, that employs this concept. In our evaluation, we use the detector on 7 open-source system of medium size to find potential variability-aware code smells samples, on which we perform a manual inspection on 20 samples of each subject system. Our results show an average precision of 40.7% (Annotation Bundle) and 62.1% (Annotation File) for detecting actual code smells. For the Large Feature we used a statistical approach to decide at which point features implement an excessive amount of functionality. The results show that features with more than 1122 lines of code are an uncommonly large. Additionally, we proposed severity ratings for ranking potential code smells, which proved to be a good indicator for the smelliness of samples. Higher-rated samples are more likely to have a negative effect on understandability and changeability than low-rated ones. For each code smell, we examined frequently recurring patterns across all systems.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Code-Smells Detection using Good and Bad Software Design Examples

Code-Smells refer to design situations that may adversely affect the maintenance of software. They make a system difficult to change, which may in turn introduce bugs. Codesmells are detected, in general, using quality metrics that formalize some symptoms based on detection rules. We propose in this work to consider the problem of code-smells detection as a multi-objective problem where example...

متن کامل

An Empirical Study of Bad Smell in Code on Maintenance Effort

In this paper, we represent an automated code smell detection and refactoring tool for calculating risk factor by detecting Code Smells and decrease risk factor by Refactoring Techniques. Refactoring is a process for restructuring or improving internal structure of software without changing its behavior. A new code smell (Lazy Catch) detection is also presented. To achieve this aim Declarative ...

متن کامل

Finding Bad Code Smells with Neural Network Models

Received May 4, 2017 Revised Jun 28, 2017 Accepted Jul 14, 2017 Code smell refers to any symptom introduced in design or implementation phases in the source code of a program. Such a code smell can potentially cause deeper and serious problems during software maintenance. The existing approaches to detect bad smells use detection rules or standards using a combination of different object-orient...

متن کامل

Smell Detection in Context

Good design is essential for long-term evolvability of software systems. To reduce the required additional short-term effort appropriate tools are highly desirable. The most promising approach [3] combines basic metrics to build complex heuristics to detect refactoring opportunities (design smells). We still saw backed by a questionnaire survey in [5] the need to systematically improve this app...

متن کامل

Code-Smells Detection as a Bi-Level Problem

Code-Smells represent design situations that can affect the maintenance and evolution of software. They make a system difficult to evolve. Code-smells are detected, in general, using quality metrics that represent some symptoms. However, the selection of suitable quality metrics is challenging due to the absence of consensus to identify some code-smells based on a set of symptoms and also the h...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2016